home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
You can browse this item here: libmpz.tex
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| LaTeX document text
| default
| |
99%
| file
| LaTeX document, ASCII text, with CR line terminators
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/281 LaTeX (Subdocument)
| default
| |
100%
| detectItEasy
| Format: plain text[CR]
| default (weak)
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [R*ch] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 73 65 63 74 69 6f 6e | 7b 42 75 69 6c 74 2d 69 |\section|{Built-i|
|00000010| 6e 20 6d 6f 64 75 6c 65 | 20 5c 73 65 63 74 63 6f |n module| \sectco|
|00000020| 64 65 7b 6d 70 7a 7d 7d | 0d 5c 62 69 6d 6f 64 69 |de{mpz}}|.\bimodi|
|00000030| 6e 64 65 78 7b 6d 70 7a | 7d 0d 0d 54 68 69 73 20 |ndex{mpz|}..This |
|00000040| 6d 6f 64 75 6c 65 20 69 | 6d 70 6c 65 6d 65 6e 74 |module i|mplement|
|00000050| 73 20 74 68 65 20 69 6e | 74 65 72 66 61 63 65 20 |s the in|terface |
|00000060| 74 6f 20 70 61 72 74 20 | 6f 66 20 74 68 65 20 47 |to part |of the G|
|00000070| 4e 55 20 4d 50 20 6c 69 | 62 72 61 72 79 2e 0d 54 |NU MP li|brary..T|
|00000080| 68 69 73 20 6c 69 62 72 | 61 72 79 20 63 6f 6e 74 |his libr|ary cont|
|00000090| 61 69 6e 73 20 61 72 62 | 69 74 72 61 72 79 20 70 |ains arb|itrary p|
|000000a0| 72 65 63 69 73 69 6f 6e | 20 69 6e 74 65 67 65 72 |recision| integer|
|000000b0| 20 61 6e 64 20 72 61 74 | 69 6f 6e 61 6c 20 6e 75 | and rat|ional nu|
|000000c0| 6d 62 65 72 0d 61 72 69 | 74 68 6d 65 74 69 63 20 |mber.ari|thmetic |
|000000d0| 72 6f 75 74 69 6e 65 73 | 2e 20 4f 6e 6c 79 20 74 |routines|. Only t|
|000000e0| 68 65 20 69 6e 74 65 72 | 66 61 63 65 73 20 74 6f |he inter|faces to|
|000000f0| 20 74 68 65 20 5c 65 6d | 70 68 7b 69 6e 74 65 67 | the \em|ph{integ|
|00000100| 65 72 7d 0d 28 5c 73 61 | 6d 70 7b 6d 70 7a 5f 7b |er}.(\sa|mp{mpz_{|
|00000110| 5c 72 6d 20 5c 6c 64 6f | 74 73 7d 7d 29 20 72 6f |\rm \ldo|ts}}) ro|
|00000120| 75 74 69 6e 65 73 20 61 | 72 65 20 70 72 6f 76 69 |utines a|re provi|
|00000130| 64 65 64 2e 20 49 66 20 | 6e 6f 74 20 73 74 61 74 |ded. If |not stat|
|00000140| 65 64 0d 6f 74 68 65 72 | 77 69 73 65 2c 20 74 68 |ed.other|wise, th|
|00000150| 65 20 64 65 73 63 72 69 | 70 74 69 6f 6e 20 69 6e |e descri|ption in|
|00000160| 20 74 68 65 20 47 4e 55 | 20 4d 50 20 64 6f 63 75 | the GNU| MP docu|
|00000170| 6d 65 6e 74 61 74 69 6f | 6e 20 63 61 6e 20 62 65 |mentatio|n can be|
|00000180| 20 61 70 70 6c 69 65 64 | 2e 0d 0d 49 6e 20 67 65 | applied|...In ge|
|00000190| 6e 65 72 61 6c 2c 20 5c | 64 66 6e 7b 6d 70 7a 7d |neral, \|dfn{mpz}|
|000001a0| 2d 6e 75 6d 62 65 72 73 | 20 63 61 6e 20 62 65 20 |-numbers| can be |
|000001b0| 75 73 65 64 20 6a 75 73 | 74 20 6c 69 6b 65 20 6f |used jus|t like o|
|000001c0| 74 68 65 72 20 73 74 61 | 6e 64 61 72 64 0d 50 79 |ther sta|ndard.Py|
|000001d0| 74 68 6f 6e 20 6e 75 6d | 62 65 72 73 2c 20 65 2e |thon num|bers, e.|
|000001e0| 67 2e 20 79 6f 75 20 63 | 61 6e 20 75 73 65 20 74 |g. you c|an use t|
|000001f0| 68 65 20 62 75 69 6c 74 | 2d 69 6e 20 6f 70 65 72 |he built|-in oper|
|00000200| 61 74 6f 72 73 20 6c 69 | 6b 65 20 5c 63 6f 64 65 |ators li|ke \code|
|00000210| 7b 2b 7d 2c 0d 5c 63 6f | 64 65 7b 2a 7d 2c 20 65 |{+},.\co|de{*}, e|
|00000220| 74 63 2e 2c 20 61 73 20 | 77 65 6c 6c 20 61 73 20 |tc., as |well as |
|00000230| 74 68 65 20 73 74 61 6e | 64 61 72 64 20 62 75 69 |the stan|dard bui|
|00000240| 6c 74 2d 69 6e 20 66 75 | 6e 63 74 69 6f 6e 73 20 |lt-in fu|nctions |
|00000250| 6c 69 6b 65 0d 5c 63 6f | 64 65 7b 61 62 73 7d 2c |like.\co|de{abs},|
|00000260| 20 5c 63 6f 64 65 7b 69 | 6e 74 7d 2c 20 5c 6c 64 | \code{i|nt}, \ld|
|00000270| 6f 74 73 2c 20 5c 63 6f | 64 65 7b 64 69 76 6d 6f |ots, \co|de{divmo|
|00000280| 64 7d 2c 20 5c 63 6f 64 | 65 7b 70 6f 77 7d 2e 0d |d}, \cod|e{pow}..|
|00000290| 5c 73 74 72 6f 6e 67 7b | 50 6c 65 61 73 65 20 6e |\strong{|Please n|
|000002a0| 6f 74 65 3a 7d 20 74 68 | 65 20 7b 5c 69 74 20 62 |ote:} th|e {\it b|
|000002b0| 69 74 77 69 73 65 2d 78 | 6f 72 7d 20 6f 70 65 72 |itwise-x|or} oper|
|000002c0| 61 74 69 6f 6e 20 68 61 | 73 20 62 65 65 6e 20 69 |ation ha|s been i|
|000002d0| 6d 70 6c 65 6d 65 6e 74 | 65 64 20 61 73 0d 61 20 |mplement|ed as.a |
|000002e0| 62 75 6e 63 68 20 6f 66 | 20 7b 5c 69 74 20 61 6e |bunch of| {\it an|
|000002f0| 64 7d 73 2c 20 7b 5c 69 | 74 20 69 6e 76 65 72 74 |d}s, {\i|t invert|
|00000300| 7d 73 20 61 6e 64 20 7b | 5c 69 74 20 6f 72 7d 73 |}s and {|\it or}s|
|00000310| 2c 20 62 65 63 61 75 73 | 65 20 74 68 65 20 6c 69 |, becaus|e the li|
|00000320| 62 72 61 72 79 0d 6c 61 | 63 6b 73 20 61 6e 20 5c |brary.la|cks an \|
|00000330| 63 6f 64 65 7b 6d 70 7a | 5f 78 6f 72 7d 20 66 75 |code{mpz|_xor} fu|
|00000340| 6e 63 74 69 6f 6e 2c 20 | 61 6e 64 20 49 20 64 69 |nction, |and I di|
|00000350| 64 6e 27 74 20 6e 65 65 | 64 20 6f 6e 65 2e 0d 0d |dn't nee|d one...|
|00000360| 59 6f 75 20 63 72 65 61 | 74 65 20 61 6e 20 6d 70 |You crea|te an mp|
|00000370| 7a 2d 6e 75 6d 62 65 72 | 2c 20 62 79 20 63 61 6c |z-number|, by cal|
|00000380| 6c 69 6e 67 20 74 68 65 | 20 66 75 6e 63 74 69 6f |ling the| functio|
|00000390| 6e 20 63 61 6c 6c 65 64 | 20 5c 63 6f 64 65 7b 6d |n called| \code{m|
|000003a0| 70 7a 7d 20 28 73 65 65 | 0d 62 65 6c 6f 77 20 66 |pz} (see|.below f|
|000003b0| 6f 72 20 61 6e 20 65 78 | 63 61 63 74 20 64 65 73 |or an ex|cact des|
|000003c0| 63 72 69 70 74 69 6f 6e | 29 2e 20 41 6e 20 6d 70 |cription|). An mp|
|000003d0| 7a 2d 6e 75 6d 62 65 72 | 20 69 73 20 70 72 69 6e |z-number| is prin|
|000003e0| 74 65 64 20 6c 69 6b 65 | 20 74 68 69 73 3a 0d 5c |ted like| this:.\|
|000003f0| 63 6f 64 65 7b 6d 70 7a | 28 5c 76 61 72 7b 76 61 |code{mpz|(\var{va|
|00000400| 6c 75 65 7d 29 7d 2e 0d | 0d 5c 72 65 6e 65 77 63 |lue})}..|.\renewc|
|00000410| 6f 6d 6d 61 6e 64 7b 5c | 69 6e 64 65 78 73 75 62 |ommand{\|indexsub|
|00000420| 69 74 65 6d 7d 7b 28 69 | 6e 20 6d 6f 64 75 6c 65 |item}{(i|n module|
|00000430| 20 6d 70 7a 29 7d 0d 5c | 62 65 67 69 6e 7b 66 75 | mpz)}.\|begin{fu|
|00000440| 6e 63 64 65 73 63 7d 7b | 6d 70 7a 7d 7b 76 61 6c |ncdesc}{|mpz}{val|
|00000450| 75 65 7d 0d 20 20 43 72 | 65 61 74 65 20 61 20 6e |ue}. Cr|eate a n|
|00000460| 65 77 20 6d 70 7a 2d 6e | 75 6d 62 65 72 2e 20 5c |ew mpz-n|umber. \|
|00000470| 76 61 72 7b 76 61 6c 75 | 65 7d 20 63 61 6e 20 62 |var{valu|e} can b|
|00000480| 65 20 61 6e 20 69 6e 74 | 65 67 65 72 2c 20 61 20 |e an int|eger, a |
|00000490| 6c 6f 6e 67 2c 0d 20 20 | 61 6e 6f 74 68 65 72 20 |long,. |another |
|000004a0| 6d 70 7a 2d 6e 75 6d 62 | 65 72 2c 20 6f 72 20 65 |mpz-numb|er, or e|
|000004b0| 76 65 6e 20 61 20 73 74 | 72 69 6e 67 2e 20 49 66 |ven a st|ring. If|
|000004c0| 20 69 74 20 69 73 20 61 | 20 73 74 72 69 6e 67 2c | it is a| string,|
|000004d0| 20 69 74 20 69 73 0d 20 | 20 69 6e 74 65 72 70 72 | it is. | interpr|
|000004e0| 65 74 65 64 20 61 73 20 | 61 6e 20 61 72 72 61 79 |eted as |an array|
|000004f0| 20 6f 66 20 72 61 64 69 | 78 2d 32 35 36 20 64 69 | of radi|x-256 di|
|00000500| 67 69 74 73 2c 20 6c 65 | 61 73 74 20 73 69 67 6e |gits, le|ast sign|
|00000510| 69 66 69 63 61 6e 74 20 | 64 69 67 69 74 0d 20 20 |ificant |digit. |
|00000520| 66 69 72 73 74 2c 20 72 | 65 73 75 6c 74 69 6e 67 |first, r|esulting|
|00000530| 20 69 6e 20 61 20 70 6f | 73 69 74 69 76 65 20 6e | in a po|sitive n|
|00000540| 75 6d 62 65 72 2e 20 53 | 65 65 20 61 6c 73 6f 20 |umber. S|ee also |
|00000550| 74 68 65 20 5c 63 6f 64 | 65 7b 62 69 6e 61 72 79 |the \cod|e{binary|
|00000560| 7d 0d 20 20 6d 65 74 68 | 6f 64 2c 20 64 65 73 63 |}. meth|od, desc|
|00000570| 72 69 62 65 64 20 62 65 | 6c 6f 77 2e 0d 5c 65 6e |ribed be|low..\en|
|00000580| 64 7b 66 75 6e 63 64 65 | 73 63 7d 0d 0d 41 20 6e |d{funcde|sc}..A n|
|00000590| 75 6d 62 65 72 20 6f 66 | 20 7b 5c 65 6d 20 65 78 |umber of| {\em ex|
|000005a0| 74 72 61 7d 20 66 75 6e | 63 74 69 6f 6e 73 20 61 |tra} fun|ctions a|
|000005b0| 72 65 20 64 65 66 69 6e | 65 64 20 69 6e 20 74 68 |re defin|ed in th|
|000005c0| 69 73 20 6d 6f 64 75 6c | 65 2e 20 4e 6f 6e 0d 6d |is modul|e. Non.m|
|000005d0| 70 7a 2d 61 72 67 75 6d | 65 6e 74 73 20 61 72 65 |pz-argum|ents are|
|000005e0| 20 63 6f 6e 76 65 72 74 | 65 64 20 74 6f 20 6d 70 | convert|ed to mp|
|000005f0| 7a 2d 76 61 6c 75 65 73 | 20 66 69 72 73 74 2c 20 |z-values| first, |
|00000600| 61 6e 64 20 74 68 65 20 | 66 75 6e 63 74 69 6f 6e |and the |function|
|00000610| 73 0d 72 65 74 75 72 6e | 20 6d 70 7a 2d 6e 75 6d |s.return| mpz-num|
|00000620| 62 65 72 73 2e 0d 0d 5c | 62 65 67 69 6e 7b 66 75 |bers...\|begin{fu|
|00000630| 6e 63 64 65 73 63 7d 7b | 70 6f 77 6d 7d 7b 62 61 |ncdesc}{|powm}{ba|
|00000640| 73 65 5c 2c 20 65 78 70 | 6f 6e 65 6e 74 5c 2c 20 |se\, exp|onent\, |
|00000650| 6d 6f 64 75 6c 75 73 7d | 0d 20 20 52 65 74 75 72 |modulus}|. Retur|
|00000660| 6e 20 5c 63 6f 64 65 7b | 70 6f 77 28 5c 76 61 72 |n \code{|pow(\var|
|00000670| 7b 62 61 73 65 7d 2c 20 | 5c 76 61 72 7b 65 78 70 |{base}, |\var{exp|
|00000680| 6f 6e 65 6e 74 7d 29 20 | 5c 25 7b 7d 20 5c 76 61 |onent}) |\%{} \va|
|00000690| 72 7b 6d 6f 64 75 6c 75 | 73 7d 7d 2e 20 49 66 0d |r{modulu|s}}. If.|
|000006a0| 20 20 5c 63 6f 64 65 7b | 5c 76 61 72 7b 65 78 70 | \code{|\var{exp|
|000006b0| 6f 6e 65 6e 74 7d 20 3d | 3d 20 30 7d 2c 20 72 65 |onent} =|= 0}, re|
|000006c0| 74 75 72 6e 20 5c 63 6f | 64 65 7b 6d 70 7a 28 31 |turn \co|de{mpz(1|
|000006d0| 29 7d 2e 20 49 6e 20 63 | 6f 6e 74 72 61 73 74 20 |)}. In c|ontrast |
|000006e0| 74 6f 20 74 68 65 0d 20 | 20 5c 43 2d 6c 69 62 72 |to the. | \C-libr|
|000006f0| 61 72 79 20 66 75 6e 63 | 74 69 6f 6e 2c 20 74 68 |ary func|tion, th|
|00000700| 69 73 20 76 65 72 73 69 | 6f 6e 20 63 61 6e 20 68 |is versi|on can h|
|00000710| 61 6e 64 6c 65 20 6e 65 | 67 61 74 69 76 65 20 65 |andle ne|gative e|
|00000720| 78 70 6f 6e 65 6e 74 73 | 2e 0d 5c 65 6e 64 7b 66 |xponents|..\end{f|
|00000730| 75 6e 63 64 65 73 63 7d | 0d 0d 5c 62 65 67 69 6e |uncdesc}|..\begin|
|00000740| 7b 66 75 6e 63 64 65 73 | 63 7d 7b 67 63 64 7d 7b |{funcdes|c}{gcd}{|
|00000750| 6f 70 31 5c 2c 20 6f 70 | 32 7d 0d 20 20 52 65 74 |op1\, op|2}. Ret|
|00000760| 75 72 6e 20 74 68 65 20 | 67 72 65 61 74 65 73 74 |urn the |greatest|
|00000770| 20 63 6f 6d 6d 6f 6e 20 | 64 69 76 69 73 6f 72 20 | common |divisor |
|00000780| 6f 66 20 5c 76 61 72 7b | 6f 70 31 7d 20 61 6e 64 |of \var{|op1} and|
|00000790| 20 5c 76 61 72 7b 6f 70 | 32 7d 2e 0d 5c 65 6e 64 | \var{op|2}..\end|
|000007a0| 7b 66 75 6e 63 64 65 73 | 63 7d 0d 0d 5c 62 65 67 |{funcdes|c}..\beg|
|000007b0| 69 6e 7b 66 75 6e 63 64 | 65 73 63 7d 7b 67 63 64 |in{funcd|esc}{gcd|
|000007c0| 65 78 74 7d 7b 61 5c 2c | 20 62 7d 0d 20 20 52 65 |ext}{a\,| b}. Re|
|000007d0| 74 75 72 6e 20 61 20 74 | 75 70 6c 65 20 5c 63 6f |turn a t|uple \co|
|000007e0| 64 65 7b 28 5c 76 61 72 | 7b 67 7d 2c 20 5c 76 61 |de{(\var|{g}, \va|
|000007f0| 72 7b 73 7d 2c 20 5c 76 | 61 72 7b 74 7d 29 7d 2c |r{s}, \v|ar{t})},|
|00000800| 20 73 75 63 68 20 74 68 | 61 74 0d 20 20 5c 63 6f | such th|at. \co|
|00000810| 64 65 7b 5c 76 61 72 7b | 61 7d 2a 5c 76 61 72 7b |de{\var{|a}*\var{|
|00000820| 73 7d 20 2b 20 5c 76 61 | 72 7b 62 7d 2a 5c 76 61 |s} + \va|r{b}*\va|
|00000830| 72 7b 74 7d 20 3d 3d 20 | 5c 76 61 72 7b 67 7d 20 |r{t} == |\var{g} |
|00000840| 3d 3d 20 67 63 64 28 5c | 76 61 72 7b 61 7d 2c 20 |== gcd(\|var{a}, |
|00000850| 5c 76 61 72 7b 62 7d 29 | 7d 2e 0d 5c 65 6e 64 7b |\var{b})|}..\end{|
|00000860| 66 75 6e 63 64 65 73 63 | 7d 0d 0d 5c 62 65 67 69 |funcdesc|}..\begi|
|00000870| 6e 7b 66 75 6e 63 64 65 | 73 63 7d 7b 73 71 72 74 |n{funcde|sc}{sqrt|
|00000880| 7d 7b 6f 70 7d 0d 20 20 | 52 65 74 75 72 6e 20 74 |}{op}. |Return t|
|00000890| 68 65 20 73 71 75 61 72 | 65 20 72 6f 6f 74 20 6f |he squar|e root o|
|000008a0| 66 20 5c 76 61 72 7b 6f | 70 7d 2e 20 54 68 65 20 |f \var{o|p}. The |
|000008b0| 72 65 73 75 6c 74 20 69 | 73 20 72 6f 75 6e 64 65 |result i|s rounde|
|000008c0| 64 20 74 6f 77 61 72 64 | 73 20 7a 65 72 6f 2e 0d |d toward|s zero..|
|000008d0| 5c 65 6e 64 7b 66 75 6e | 63 64 65 73 63 7d 0d 0d |\end{fun|cdesc}..|
|000008e0| 5c 62 65 67 69 6e 7b 66 | 75 6e 63 64 65 73 63 7d |\begin{f|uncdesc}|
|000008f0| 7b 73 71 72 74 72 65 6d | 7d 7b 6f 70 7d 0d 20 20 |{sqrtrem|}{op}. |
|00000900| 52 65 74 75 72 6e 20 61 | 20 74 75 70 6c 65 20 5c |Return a| tuple \|
|00000910| 63 6f 64 65 7b 28 5c 76 | 61 72 7b 72 6f 6f 74 7d |code{(\v|ar{root}|
|00000920| 2c 20 5c 76 61 72 7b 72 | 65 6d 61 69 6e 64 65 72 |, \var{r|emainder|
|00000930| 7d 29 7d 2c 20 73 75 63 | 68 20 74 68 61 74 0d 20 |})}, suc|h that. |
|00000940| 20 5c 63 6f 64 65 7b 5c | 76 61 72 7b 72 6f 6f 74 | \code{\|var{root|
|00000950| 7d 2a 5c 76 61 72 7b 72 | 6f 6f 74 7d 20 2b 20 5c |}*\var{r|oot} + \|
|00000960| 76 61 72 7b 72 65 6d 61 | 69 6e 64 65 72 7d 20 3d |var{rema|inder} =|
|00000970| 3d 20 5c 76 61 72 7b 6f | 70 7d 7d 2e 0d 5c 65 6e |= \var{o|p}}..\en|
|00000980| 64 7b 66 75 6e 63 64 65 | 73 63 7d 0d 0d 5c 62 65 |d{funcde|sc}..\be|
|00000990| 67 69 6e 7b 66 75 6e 63 | 64 65 73 63 7d 7b 64 69 |gin{func|desc}{di|
|000009a0| 76 6d 7d 7b 6e 75 6d 65 | 72 61 74 6f 72 5c 2c 20 |vm}{nume|rator\, |
|000009b0| 64 65 6e 6f 6d 69 6e 61 | 74 6f 72 5c 2c 20 6d 6f |denomina|tor\, mo|
|000009c0| 64 75 6c 75 73 7d 0d 20 | 20 52 65 74 75 72 6e 73 |dulus}. | Returns|
|000009d0| 20 61 20 6e 75 6d 62 65 | 72 20 5c 76 61 72 7b 71 | a numbe|r \var{q|
|000009e0| 7d 2e 20 73 75 63 68 20 | 74 68 61 74 0d 20 20 5c |}. such |that. \|
|000009f0| 63 6f 64 65 7b 5c 76 61 | 72 7b 71 7d 20 2a 20 5c |code{\va|r{q} * \|
|00000a00| 76 61 72 7b 64 65 6e 6f | 6d 69 6e 61 74 6f 72 7d |var{deno|minator}|
|00000a10| 20 5c 25 7b 7d 20 5c 76 | 61 72 7b 6d 6f 64 75 6c | \%{} \v|ar{modul|
|00000a20| 75 73 7d 20 3d 3d 20 5c | 76 61 72 7b 6e 75 6d 65 |us} == \|var{nume|
|00000a30| 72 61 74 6f 72 7d 7d 2e | 0d 20 20 4f 6e 65 20 63 |rator}}.|. One c|
|00000a40| 6f 75 6c 64 20 61 6c 73 | 6f 20 69 6d 70 6c 65 6d |ould als|o implem|
|00000a50| 65 6e 74 20 74 68 69 73 | 20 66 75 6e 63 74 69 6f |ent this| functio|
|00000a60| 6e 20 69 6e 20 70 79 74 | 68 6f 6e 2c 20 75 73 69 |n in pyt|hon, usi|
|00000a70| 6e 67 20 5c 63 6f 64 65 | 7b 67 63 64 65 78 74 7d |ng \code|{gcdext}|
|00000a80| 2e 0d 5c 65 6e 64 7b 66 | 75 6e 63 64 65 73 63 7d |..\end{f|uncdesc}|
|00000a90| 0d 0d 41 6e 20 6d 70 7a | 2d 6e 75 6d 62 65 72 20 |..An mpz|-number |
|00000aa0| 68 61 73 20 6f 6e 65 20 | 6d 65 74 68 6f 64 3a 0d |has one |method:.|
|00000ab0| 0d 5c 72 65 6e 65 77 63 | 6f 6d 6d 61 6e 64 7b 5c |.\renewc|ommand{\|
|00000ac0| 69 6e 64 65 78 73 75 62 | 69 74 65 6d 7d 7b 28 6d |indexsub|item}{(m|
|00000ad0| 70 7a 20 6d 65 74 68 6f | 64 29 7d 0d 5c 62 65 67 |pz metho|d)}.\beg|
|00000ae0| 69 6e 7b 66 75 6e 63 64 | 65 73 63 7d 7b 62 69 6e |in{funcd|esc}{bin|
|00000af0| 61 72 79 7d 7b 7d 0d 20 | 20 43 6f 6e 76 65 72 74 |ary}{}. | Convert|
|00000b00| 20 74 68 69 73 20 6d 70 | 7a 2d 6e 75 6d 62 65 72 | this mp|z-number|
|00000b10| 20 74 6f 20 61 20 62 69 | 6e 61 72 79 20 73 74 72 | to a bi|nary str|
|00000b20| 69 6e 67 2c 20 77 68 65 | 72 65 20 74 68 65 20 6e |ing, whe|re the n|
|00000b30| 75 6d 62 65 72 20 68 61 | 73 20 62 65 65 6e 0d 20 |umber ha|s been. |
|00000b40| 20 73 74 6f 72 65 64 20 | 61 73 20 61 6e 20 61 72 | stored |as an ar|
|00000b50| 72 61 79 20 6f 66 20 72 | 61 64 69 78 2d 32 35 36 |ray of r|adix-256|
|00000b60| 20 64 69 67 69 74 73 2c | 20 6c 65 61 73 74 20 73 | digits,| least s|
|00000b70| 69 67 6e 69 66 69 63 61 | 6e 74 20 64 69 67 69 74 |ignifica|nt digit|
|00000b80| 20 66 69 72 73 74 2e 0d | 0d 20 20 54 68 65 20 6d | first..|. The m|
|00000b90| 70 7a 2d 6e 75 6d 62 65 | 72 20 6d 75 73 74 20 68 |pz-numbe|r must h|
|00000ba0| 61 76 65 20 61 20 76 61 | 6c 75 65 20 67 72 65 61 |ave a va|lue grea|
|00000bb0| 74 65 72 20 74 68 61 6e | 2d 20 6f 72 20 65 71 75 |ter than|- or equ|
|00000bc0| 61 6c 20 74 6f 20 7a 65 | 72 6f 2c 0d 20 20 6f 74 |al to ze|ro,. ot|
|00000bd0| 68 65 72 77 69 73 65 20 | 61 20 5c 63 6f 64 65 7b |herwise |a \code{|
|00000be0| 56 61 6c 75 65 45 72 72 | 6f 72 7d 2d 65 78 63 65 |ValueErr|or}-exce|
|00000bf0| 70 74 69 6f 6e 20 77 69 | 6c 6c 20 62 65 20 72 61 |ption wi|ll be ra|
|00000c00| 69 73 65 64 2e 0d 5c 65 | 6e 64 7b 66 75 6e 63 64 |ised..\e|nd{funcd|
|00000c10| 65 73 63 7d 0d | |esc}. | |
+--------+-------------------------+-------------------------+--------+--------+